﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using IankerProj.Models;

namespace IankerProj.Controllers
{
    public class SanphamController : Controller
    {
        AnkerDBEntities db = new AnkerDBEntities();
        //
        // GET: /Sanpham/

        public ActionResult Index(int id,string ten)
        {
            var p = db.Thietbis.Where(c => c.idcha == id).ToList();
            ViewBag.ten = ten;
            return View(p);
        }
        public ActionResult Hotsale()
        {
            var p = db.Thietbis.Where(c=>c.idcha==6).ToList();
            return View(p);
        }
        public ActionResult Chitiet(int id)
        {
            var p = db.Thietbis.Where(c => c.id == id).ToList();
            return View(p);
        }
    }
}
